﻿<%@ Page Title="" Language="C#" MasterPageFile="MIOS.master" AutoEventWireup="true" CodeFile="Cart.aspx.cs" Inherits="Cart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style143
        {
            width: 56px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
        购物车</p>
    <p>
        <asp:GridView ID="CartView" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True">
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="No" HeaderText="序号">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="instruID" 
                    DataNavigateUrlFormatString="GoodDetail.aspx?instruID={0}" DataTextField="name" 
                    HeaderText="名称" >
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:HyperLinkField>
                <asp:TemplateField HeaderText="数量">
                    <ItemTemplate >
                        <asp:TextBox ID="txtNum" runat="server" Text =<%#Eval("number")%>  OnTextChanged="txtNum_TextChanged"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtNum"
                        ErrorMessage="×" ValidationExpression="^\+?[1-9][0-9]*$"></asp:RegularExpressionValidator>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText ="单价">
                     <HeaderStyle HorizontalAlign=Center />
                     <ItemStyle HorizontalAlign =Center />
                     <ItemTemplate >
                        <%#Eval("price")%>
                     </ItemTemplate>    
                 </asp:TemplateField>
                <asp:TemplateField HeaderText =总价>
                     <HeaderStyle HorizontalAlign=Center />
                     <ItemStyle HorizontalAlign =Center />
                     <ItemTemplate >
                        <%#Eval("totalPrice")%>
                     </ItemTemplate>    
                 </asp:TemplateField>
                 <asp:TemplateField>
                     <HeaderStyle HorizontalAlign=Center />
                     <ItemStyle HorizontalAlign =Center />
                     <ItemTemplate >
                         <asp:LinkButton ID="lnkbtnDelete" runat="server" CommandArgument ='<%#Eval("instruID") %>' OnCommand ="lnkbtnDelete_Command">删除</asp:LinkButton>
                     </ItemTemplate>    
                 </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
    </p>
    <p>
        <table style="width: 71%; text-align:center">
            <tr>
                <td class="style143">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="Continueshop" runat="server" Text="继续购物" 
                        onclick="btnContinueshop_Click" Width="58px" />
                </td>
                <td>
                    <asp:Button ID="Summitdeliv" runat="server" Text="提交订单" Width="58px" 
                        onclick="btnSummitdeliv_Click" />
                </td>
                <td>
                    <asp:Button ID="Canceldeliv" runat="server" Text="取消订单" onclick="btnCanceldeliv_Click" 
                        Width="58px" />
                </td>
            </tr>
        </table>
    </p>
</asp:Content>

